home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
FPRINTF.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-11-20
|
581b
|
41 lines
include compiler.inc
ttl FPRINTF, 1.05, 10-20-86 jwk
;formatted print to file
dseg
defptr strm ;saves stream pointer
cseg
xtfs <_fmt, putc>
procdef fprintf, <<fp, ptr>, <arglst, word>>
pushreg
pushds
ldptr di, fp ;set up file pointer
svptr di, strm
mov ax, offset pc ;pointer to function
lea dx, arglst ;adr of first arg
callit _fmt, <<dx, preg, ss>, <ax, preg, cs>>
pret
pend fprintf
statdef pc, <<chr, byte>>
mov al, chr
xor ah, ah
callit putc <<strm, ptr, dx>, <ax, reg>>
pret
iend pc
finish
end